package com.shrct.businessprocess.purchase;

import com.shrct.businessprocess.budget.RCBudget;
import com.shrct.businessprocess.budget.RCCost4ACTItem;
import com.shrct.businessprocess.diagnose.ICanDiagnose;
import com.shrct.businessprocess.diagnose.IDiagnoseAcceptor;
import com.shrct.businessprocess.organization.RCSupplier;
import com.shrct.businessprocess.project.IHasProject;
import com.shrct.businessprocess.project.RCExchangeRate;
import com.shrct.businessprocess.project.RCProject;
import com.shrct.businessprocess.project.RCProjectMoney;
import com.shrct.businessprocess.project.RCRealMoney;
import com.shrct.businessprocess.purchase.RCBasePurchaseOrderAccept;
import com.shrct.businessprocess.purchase.RCBasePurchasePayRequest;
import com.shrct.businessprocess.purchase.RCBasePurchaseRequest;
import com.shrct.businessprocess.purchase.RCOrderCommissionPayRequest;
import com.shrct.businessprocess.purchase.RCPurchaseOrderInvoice;
import com.shrct.businessprocess.purchase.RCPurchaseOrderProcess;
import com.shrct.businessprocess.purchase.RCPurchasePayRequest;
import com.shrct.businessprocess.purchase.impl.RCBasePurchaseOrderImpl;
import com.shrct.businessprocess.purchase.proxy.RCBasePurchaseOrderProxy;
import edu.fudan.mylang.pf.EntityImplementation;
import edu.fudan.mylang.pf.IModelObject;
import edu.fudan.mylang.pf.INamedModelObject;
import java.util.Collection;
import java.util.Date;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;

@EntityImplementation(implementBy = RCBasePurchaseOrderImpl.class)
public interface RCBasePurchaseOrder extends IModelObject, INamedModelObject, ICanDiagnose, IHasProject {
  public abstract String getOrderNumber();
  
  public abstract RCBasePurchaseOrder setOrderNumber(final String orderNumber);
  
  public abstract Boolean getIsInitialized();
  
  public abstract RCBasePurchaseOrder setIsInitialized(final Boolean isInitialized);
  
  public abstract String getPayMethodStr();
  
  public abstract RCBasePurchaseOrder setPayMethodStr(final String payMethodStr);
  
  public abstract RCSupplier getSupplier();
  
  public abstract RCBasePurchaseOrder setSupplier(final RCSupplier supplier);
  
  public abstract Date getInitializeDate();
  
  public abstract RCBasePurchaseOrder setInitializeDate(final Date initializeDate);
  
  public abstract Date getCloseDate();
  
  public abstract RCBasePurchaseOrder setCloseDate(final Date closeDate);
  
  public abstract Integer getTerm();
  
  public abstract RCBasePurchaseOrder setTerm(final Integer term);
  
  public abstract Boolean getIsClosed();
  
  public abstract RCBasePurchaseOrder setIsClosed(final Boolean isClosed);
  
  public abstract Double getTaxRate();
  
  public abstract RCBasePurchaseOrder setTaxRate(final Double taxRate);
  
  public abstract RCExchangeRate getExchangeRate();
  
  public abstract RCBasePurchaseOrder setExchangeRate(final RCExchangeRate exchangeRate);
  
  public abstract Boolean isCanceled();
  
  public abstract RCProjectMoney getTax();
  
  public abstract void diagnose(final IDiagnoseAcceptor acceptor);
  
  public abstract RCBasePurchaseRequest getPurchaseRequest();
  
  public abstract RCBudget getBudget();
  
  /**
   * 付款申请总金额
   */
  public abstract RCProjectMoney getTotalRequestPay();
  
  public abstract RCOrderCommissionPayRequest createCommissionPayRequest();
  
  /**
   * 以项目汇率和币种为结算方式的已支付金额
   */
  public abstract RCProjectMoney getTotalPayedProjectAmount();
  
  public abstract Boolean getIsAllMoneyPaid();
  
  /**
   * 订单总金额
   */
  public abstract RCProjectMoney getTotalCost();
  
  public abstract RCRealMoney getTotalInvoiceAmount();
  
  /**
   * 最近付款截止日
   */
  public abstract Date getNearestPayDeadline();
  
  public abstract Iterable<RCCost4ACTItem> getCost4ACItems();
  
  /**
   * 已支付总金额
   */
  public abstract RCRealMoney getTotalPayedAmount();
  
  public abstract RCPurchaseOrderProcess getProcess();
  
  public abstract Collection<RCBasePurchasePayRequest> getPayRequests();
  
  public abstract RCBasePurchasePayRequest createAndAddtoPayRequests();
  
  public abstract RCBasePurchasePayRequest createAndAddtoPayRequests(final Procedure1<RCBasePurchasePayRequest> updater);
  
  public abstract RCBasePurchaseOrder removeFromPayRequests(final RCBasePurchasePayRequest rCBasePurchasePayRequest);
  
  public abstract RCBasePurchaseOrder removeAllPayRequests();
  
  public abstract Collection<RCPurchaseOrderInvoice> getInvoices();
  
  public abstract RCPurchaseOrderInvoice createAndAddtoInvoices();
  
  public abstract RCPurchaseOrderInvoice createAndAddtoInvoices(final Procedure1<RCPurchaseOrderInvoice> updater);
  
  public abstract RCBasePurchaseOrder removeFromInvoices(final RCPurchaseOrderInvoice rCPurchaseOrderInvoice);
  
  public abstract RCBasePurchaseOrder removeAllInvoices();
  
  public abstract RCExchangeRate getDefaultExchangeRate();
  
  public abstract String getEntityName();
  
  public abstract RCProject getProject();
  
  public abstract RCPurchaseOrderInvoice createInvoice();
  
  public abstract RCPurchasePayRequest createPayRequest();
  
  /**
   * 结存预付款
   */
  public abstract RCProjectMoney getRemainPayAmount();
  
  /**
   * 收货总金额
   */
  public abstract Collection<? extends RCBasePurchaseOrderAccept> getAcceptItems();
  
  public abstract RCProjectMoney getTotalAcceptItemsAmount();
  
  public abstract void startAudit();
  
  public abstract void auditPassed();
  
  public abstract void auditCanceled();
  
  public abstract void invoiceRegister();
  
  public abstract void payRequest();
  
  public abstract RCBasePurchaseOrderProxy toProxy();
}
